<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>AmpleHarvest: cAmpleHarvestLog.php Source File</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>

</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">AmpleHarvest
   &#160;<span id="projectnumber">0.0.1</span>
   </div>
   
  </td>
  
  
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.7.5.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>File&#160;Members</span></a></li>
    </ul>
  </div>
</div>
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
  initNavTree('c_ample_harvest_log_8php.html','');
</script>
<div id="doc-content">
<div class="header">
  <div class="headertitle">
<div class="title">cAmpleHarvestLog.php</div>  </div>
</div>
<div class="contents">
<a href="c_ample_harvest_log_8php.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 &lt;?php
<a name="l00002"></a>00002         use\ampleharvest\code\cConfig;
<a name="l00006"></a>00006         require_once(dirname(dirname(__FILE__))) . <span class="stringliteral">&#39;/config/cConfig.php&#39;</span>;
<a name="l00007"></a>00007         require_once <span class="stringliteral">&#39;Tables/cTABLE_Log.php&#39;</span>;
<a name="l00008"></a>00008 
<a name="l00009"></a>00009         require_once cConfig::C_STR_LOG_LIB_PATH . <span class="stringliteral">&quot;/Abstract_Classes/abs_Log.php&quot;</span>;
<a name="l00010"></a>00010 
<a name="l00011"></a><a class="code" href="classc_ample_harvest_log.html">00011</a>         <span class="keyword">class </span><a class="code" href="classc_ample_harvest_log.html" title="Includes Path Info Class.">cAmpleHarvestLog</a> <span class="keyword">extends</span> \abs_Log
<a name="l00012"></a>00012         {
<a name="l00018"></a><a class="code" href="classc_ample_harvest_log.html#aeaeab00d311e21b9a5515bd319d998d7">00018</a>                 <span class="keyword">const</span> <a class="code" href="classc_ample_harvest_log.html#aeaeab00d311e21b9a5515bd319d998d7">C_INT_LEVEL_NONE</a> = 0;
<a name="l00019"></a><a class="code" href="classc_ample_harvest_log.html#a483d683544db816b71891ee1a3010568">00019</a>                 <span class="keyword">const</span> <a class="code" href="classc_ample_harvest_log.html#a483d683544db816b71891ee1a3010568">C_INT_LEVEL_ERRORS</a> = 25;
<a name="l00020"></a><a class="code" href="classc_ample_harvest_log.html#ac75ce249ff964cc240a65f2807cdd475">00020</a>                 <span class="keyword">const</span> <a class="code" href="classc_ample_harvest_log.html#ac75ce249ff964cc240a65f2807cdd475">C_INT_LEVEL_INFO</a> = 50;
<a name="l00021"></a><a class="code" href="classc_ample_harvest_log.html#ae2d3ca37a2eb6eb97e48f2e3d6389641">00021</a>                 <span class="keyword">const</span> <a class="code" href="classc_ample_harvest_log.html#ae2d3ca37a2eb6eb97e48f2e3d6389641">C_INT_LEVEL_DEBUG</a> = 100;
<a name="l00022"></a><a class="code" href="classc_ample_harvest_log.html#a462d5dee9849159147127c5e287dc1d7">00022</a>                 <span class="keyword">const</span> <a class="code" href="classc_ample_harvest_log.html#a462d5dee9849159147127c5e287dc1d7">C_INT_LEVEL_HIDDEN</a> = 200;
<a name="l00030"></a><a class="code" href="classc_ample_harvest_log.html#a3150abb695e4662d01e6636819682b68">00030</a>                 <span class="keyword">const</span> <a class="code" href="classc_ample_harvest_log.html#a3150abb695e4662d01e6636819682b68">C_STR_ACTION_DATA_INDEX_INFO</a> = <span class="stringliteral">&quot;Data Index Info&quot;</span>;
<a name="l00031"></a><a class="code" href="classc_ample_harvest_log.html#a4b89308bc165d171ae8ccdf48387d316">00031</a>                 <span class="keyword">const</span> <a class="code" href="classc_ample_harvest_log.html#a4b89308bc165d171ae8ccdf48387d316">C_STR_ACTION_DATA_INDEX_ERROR</a> = <span class="stringliteral">&quot;Data Index Error&quot;</span>;
<a name="l00032"></a><a class="code" href="classc_ample_harvest_log.html#a09881a38228b156dbb5f01ece412016b">00032</a>                 <span class="keyword">const</span> <a class="code" href="classc_ample_harvest_log.html#a09881a38228b156dbb5f01ece412016b">C_STR_ACTION_DATA_PROC_1_INFO</a> = <span class="stringliteral">&quot;Data Processing Stage 1 Info&quot;</span>;
<a name="l00033"></a><a class="code" href="classc_ample_harvest_log.html#aae6dfd50fd3dbb72a82eb2d2d10f1486">00033</a>                 <span class="keyword">const</span> <a class="code" href="classc_ample_harvest_log.html#aae6dfd50fd3dbb72a82eb2d2d10f1486">C_STR_ACTION_DATA_PROC_1_ERROR</a> = <span class="stringliteral">&quot;Data Processing Stage 1 Error&quot;</span>;
<a name="l00034"></a><a class="code" href="classc_ample_harvest_log.html#a33bc2ee42dfee4c54134461dee0d6964">00034</a>                 <span class="keyword">const</span> <a class="code" href="classc_ample_harvest_log.html#a33bc2ee42dfee4c54134461dee0d6964">C_STR_ACTION_EMAIL_INFO</a> = <span class="stringliteral">&quot;Email Info&quot;</span>;
<a name="l00035"></a><a class="code" href="classc_ample_harvest_log.html#adc21048c6fd9f01adc1f31e864c4aff7">00035</a>                 <span class="keyword">const</span> <a class="code" href="classc_ample_harvest_log.html#adc21048c6fd9f01adc1f31e864c4aff7">C_STR_ACTION_EMAIL_ERROR</a> = <span class="stringliteral">&quot;Email Error&quot;</span>;
<a name="l00036"></a><a class="code" href="classc_ample_harvest_log.html#ae01e2cf838cc40ebda976cad9496f37c">00036</a>                 <span class="keyword">const</span> <a class="code" href="classc_ample_harvest_log.html#ae01e2cf838cc40ebda976cad9496f37c">C_STR_ACTION_QUERY_NOTIFICATION_INFO</a> = <span class="stringliteral">&quot;Query Notification Info&quot;</span>;
<a name="l00037"></a><a class="code" href="classc_ample_harvest_log.html#a3fdc5fdbfd292a543b793cb4b31d4393">00037</a>                 <span class="keyword">const</span> <a class="code" href="classc_ample_harvest_log.html#a3fdc5fdbfd292a543b793cb4b31d4393">C_STR_ACTION_QUERY_NOTIFICATION_ERROR</a> = <span class="stringliteral">&quot;Query Notification Error&quot;</span>;
<a name="l00038"></a><a class="code" href="classc_ample_harvest_log.html#a458477115e663e277a24d2b87464c9c5">00038</a>                 <span class="keyword">const</span> <a class="code" href="classc_ample_harvest_log.html#a458477115e663e277a24d2b87464c9c5">C_STR_ACTION_STOMP_INFO</a> = <span class="stringliteral">&quot;STOMP Info&quot;</span>;
<a name="l00039"></a><a class="code" href="classc_ample_harvest_log.html#a57b5072e8fb65d0522abc241588e1778">00039</a>                 <span class="keyword">const</span> <a class="code" href="classc_ample_harvest_log.html#a57b5072e8fb65d0522abc241588e1778">C_STR_ACTION_STOMP_ERROR</a> = <span class="stringliteral">&quot;STOMP Error&quot;</span>;
<a name="l00040"></a><a class="code" href="classc_ample_harvest_log.html#ab2a782d3c071d8eb5b153216beece32f">00040</a>                 <span class="keyword">const</span> <a class="code" href="classc_ample_harvest_log.html#ab2a782d3c071d8eb5b153216beece32f">C_STR_ACTION_TASK_INFO</a> = <span class="stringliteral">&quot;Task Info&quot;</span>;
<a name="l00041"></a><a class="code" href="classc_ample_harvest_log.html#afef0d8991975e8940cfcb0c4e2691616">00041</a>                 <span class="keyword">const</span> <a class="code" href="classc_ample_harvest_log.html#afef0d8991975e8940cfcb0c4e2691616">C_STR_ACTION_TASK_ERROR</a> = <span class="stringliteral">&quot;Task Error&quot;</span>;
<a name="l00042"></a>00042 
<a name="l00044"></a><a class="code" href="classc_ample_harvest_log.html#ace45cee705d082de271d800344399131">00044</a>                 <span class="keyword">protected</span> <a class="code" href="classc_ample_harvest_log.html#ace45cee705d082de271d800344399131">$m_obj_TABLE_Log</a> = null;
<a name="l00045"></a>00045 
<a name="l00046"></a><a class="code" href="classc_ample_harvest_log.html#a932d663d473d633c385995162bcfa963">00046</a>                 <span class="keyword">protected</span> <a class="code" href="classc_ample_harvest_log.html#a932d663d473d633c385995162bcfa963">$m_str_Proc_ID</a> = <span class="stringliteral">&quot;&quot;</span>;
<a name="l00047"></a>00047 
<a name="l00051"></a><a class="code" href="classc_ample_harvest_log.html#a095c5d389db211932136b53f25f39685">00051</a>                 <span class="keyword">public</span> <span class="keyword">function</span> <a class="code" href="classc_ample_harvest_log.html#a095c5d389db211932136b53f25f39685" title="Set default Log Settings.">__construct</a>()
<a name="l00052"></a>00052                 {
<a name="l00053"></a>00053                         $this-&gt;set_LogLevel(cConfig::C_INT_LOG_LEVEL);
<a name="l00054"></a>00054                         $this-&gt;set_LogFormat(self::C_INT_LOG_FORMAT_DATABASE);
<a name="l00055"></a>00055                         $this-&gt;activate();
<a name="l00056"></a>00056 
<a name="l00057"></a>00057                         $this-&gt;m_obj_TABLE_Log = <span class="keyword">new</span> <a class="code" href="classc_t_a_b_l_e___log.html" title="Includes the base class for Tables (uses base path from the cinfo file.">cTABLE_Log</a>();
<a name="l00058"></a>00058                 }
<a name="l00059"></a>00059 
<a name="l00060"></a><a class="code" href="classc_ample_harvest_log.html#a9518c9dfa7090d31b8c1afc50b363a6d">00060</a>                 <span class="keyword">public</span> <span class="keyword">function</span> <a class="code" href="classc_ample_harvest_log.html#a9518c9dfa7090d31b8c1afc50b363a6d">get_ProcID</a>()
<a name="l00061"></a>00061                 {
<a name="l00062"></a>00062                         <span class="keywordflow">if</span> (!$this-&gt;m_str_Proc_ID)
<a name="l00063"></a>00063                         {
<a name="l00064"></a>00064                                 $this-&gt;m_str_Proc_ID = uniqid();
<a name="l00065"></a>00065                         }
<a name="l00066"></a>00066 
<a name="l00067"></a>00067                         <span class="keywordflow">return</span> $this-&gt;m_str_Proc_ID;
<a name="l00068"></a>00068                 }
<a name="l00069"></a>00069 
<a name="l00084"></a><a class="code" href="classc_ample_harvest_log.html#a2ffea368fcba1d17806db238154280c2">00084</a>                 <span class="keyword">protected</span> <span class="keyword">function</span> <a class="code" href="classc_ample_harvest_log.html#a2ffea368fcba1d17806db238154280c2" title="Outputs Log information to a file.">do_DBLog</a>($str_LogType, $str_LogData)
<a name="l00085"></a>00085                 {
<a name="l00086"></a>00086                         $this-&gt;m_obj_TABLE_Log-&gt;clear();
<a name="l00087"></a>00087 
<a name="l00088"></a>00088                         $this-&gt;m_obj_TABLE_Log-&gt;set_msg($str_LogData);
<a name="l00089"></a>00089                         $this-&gt;m_obj_TABLE_Log-&gt;set_proc_id($this-&gt;<a class="code" href="classc_ample_harvest_log.html#a9518c9dfa7090d31b8c1afc50b363a6d">get_ProcID</a>());
<a name="l00090"></a>00090                         $this-&gt;m_obj_TABLE_Log-&gt;set_type($str_LogType);
<a name="l00091"></a>00091                         $this-&gt;m_obj_TABLE_Log-&gt;set_timestamp(date(<span class="stringliteral">&quot;Y-m-d H:i:s&quot;</span>));
<a name="l00092"></a>00092 
<a name="l00093"></a>00093                         <span class="keywordflow">if</span> ($this-&gt;m_obj_TABLE_Log-&gt;save_Data2DB())
<a name="l00094"></a>00094                         {
<a name="l00095"></a>00095                                 <span class="keywordflow">return</span> 0;
<a name="l00096"></a>00096                         }
<a name="l00097"></a>00097 
<a name="l00098"></a>00098                         <span class="keywordflow">return</span> -2;
<a name="l00099"></a>00099                 }
<a name="l00100"></a>00100         }
</pre></div></div>
</div>
  <div id="nav-path" class="navpath">
    <ul>
      <li class="navelem"><a class="el" href="c_ample_harvest_log_8php.html">cAmpleHarvestLog.php</a>      </li>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Namespaces</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Variables</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>


    <li class="footer">Generated on Mon Jan 23 2012 13:34:19 for AmpleHarvest by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.5.1 </li>
   </ul>
 </div>


</body>
</html>
